package org.example.service;

import org.apache.ibatis.annotations.Param;
import org.example.model.User;
import org.springframework.web.multipart.MultipartFile;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface UserService {
    List<User> listAll();
    List<User> list(int current,int size);
    User findById(Integer id);
    Boolean addUser(User user);
    Boolean delById(Integer id);
    Boolean updateById(User user);
    List<User> selectList(int current,int size,@Param("username") String username,@Param("age") Integer age);
   void deleteByIds(List<Integer> ids);
    int insertList(List<User> users);

    void exportUsersToExcel(List<User> userlist, HttpServletResponse response);
    void uploadImg(Integer id, String avatar);
    User findByName(String name);

    User login2(String username,String password);

    String login(User user);
    String register(User user);

}
